class Login {
    constructor(obj) {
        this.username = obj.username;
        this.password = obj.password;
    }
    check() {
        if (!this.username) {
            throw { success: false, msg: '用户名不能为空' };
        }
        if (!this.password) {
            throw { success: false, msg: '密码不能为空' };
        }
    }
}